package com.sky.bo;

import com.github.xiaoymin.knife4j.core.util.StrUtil;
import com.sky.dto.EmployeePageDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 员工分页查询bo
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EmployeeBo implements Serializable {

    private Integer page;

    private Integer pageSize;

    private String name;

    //转换DTO
public EmployeePageDTO getDTO(){
    EmployeePageDTO employeeDTO = new EmployeePageDTO();
    page = page == null ? 1 : page;
    pageSize = pageSize == null ? 10 : pageSize;
    employeeDTO.setPage(page);
    employeeDTO.setPageSize(pageSize);
    employeeDTO.setName(name);
    return employeeDTO;
}
}
